{% if is_git_revision %}
  <div id="is_git_revision"></div>
{% endif %}

{{ message|raw }}

{{ partial_logout|raw }}

<div id="maincontainer">
  {{ sync_favorite_tables|raw }}
  <div class="container-fluid">
    <div class="row">
      <div class="col-lg-7 col-12">
        {% if has_server %}
          {% if is_demo %}
            <div class="card mt-4">
              <div class="card-header">
                {% trans 'phpMyAdmin Demo Server' %}
              </div>
              <div class="card-body">
                {% apply format('<a href="url.php?url=https://demo.phpmyadmin.net/" target="_blank" rel="noopener noreferrer">demo.phpmyadmin.net</a>')|raw %}
                  {% trans %}
                    You are using the demo server. You can do anything here, but please do not change root, debian-sys-maint and pma users. More information is available at %s.
                  {% endtrans %}
                {% endapply %}
              </div>
            </div>
          {% endif %}

            <div class="card mt-4">
              <div class="card-header">
                {% trans 'General settings' %}
              </div>
              <ul class="list-group list-group-flush">
                {% if has_server_selection %}
                  <li id="li_select_server" class="list-group-item">
                    {{ get_image('s_host') }}
                    {{ server_selection|raw }}
                  </li>
                {% endif %}

                {% if server > 0 %}
                  {{ change_password is not empty ? change_password|raw }}

                  <li id="li_select_mysql_collation" class="list-group-item">
                    <form class="disableAjax" method="post" action="{{ url('/collation-connection') }}">
                      {{ get_hidden_inputs(null, null, 4, 'collation_connection') }}
                      <label for="select_collation_connection">
                        {{ get_image('s_asci') }}
                        {% trans 'Server connection collation:' %}
                        {{ show_mysql_docu('charset-connection') }}
                      </label>
                      {% if charsets is not empty %}
                        <select lang="en" dir="ltr" name="collation_connection" id="select_collation_connection" class="autosubmit">
                          <option value="">{% trans 'Collation' %}</option>
                          <option value=""></option>
                          {% for charset in charsets %}
                            <optgroup label="{{ charset.name }}" title="{{ charset.description }}">
                              {% for collation in charset.collations %}
                                <option value="{{ collation.name }}" title="{{ collation.description }}"{{ collation.is_selected ? ' selected' }}>
                                  {{- collation.name -}}
                                </option>
                              {% endfor %}
                            </optgroup>
                          {% endfor %}
                        </select>
                      {% endif %}
                    </form>
                  </li>
                {% endif %}
                {{ user_preferences is not empty ? user_preferences|raw }}
              </ul>
            </div>
          {% endif %}

            <div class="card mt-4">
              <div class="card-header">
                {% trans 'Appearance settings' %}
              </div>
              <ul class="list-group list-group-flush">
                {% if language_selector is not empty %}
                  <li id="li_select_lang" class="list-group-item">
                    {{ get_image('s_lang') }}
                    {{ language_selector|raw }}
                  </li>
                {% endif %}

                {% if theme_selection is not empty %}
                  <li id="li_select_theme" class="list-group-item">
                    {{ get_image('s_theme') }}
                    {{ theme_selection|raw }}
                  </li>
                {% endif %}
              </ul>
            </div>
          </div>

      <div class="col-lg-5 col-12">
        {% if database_server is not empty %}
          <div class="card mt-4">
            <div class="card-header">
              {% trans 'Database server' %}
            </div>
            <ul class="list-group list-group-flush">
              <li class="list-group-item">
                {% trans 'Server:' %}
                {{ database_server.host }}
              </li>
              <li class="list-group-item">
                {% trans 'Server type:' %}
                {{ database_server.type }}
              </li>
              <li class="list-group-item">
                {% trans 'Server connection:' %}
                {{ database_server.connection|raw }}
              </li>
              <li class="list-group-item">
                {% trans 'Server version:' %}
                {{ database_server.version }}
              </li>
              <li class="list-group-item">
                {% trans 'Protocol version:' %}
                {{ database_server.protocol }}
              </li>
              <li class="list-group-item">
                {% trans 'User:' %}
                {{ database_server.user }}
              </li>
              <li class="list-group-item">
                {% trans 'Server charset:' %}
                <span lang="en" dir="ltr">
                  {{ database_server.charset }}
                </span>
              </li>
            </ul>
          </div>
        {% endif %}

        {% if web_server is not empty or php_info is not empty %}
          <div class="card mt-4">
            <div class="card-header">
              {% trans 'Web server' %}
            </div>
            <ul class="list-group list-group-flush">
              {% if web_server is not empty %}
                <li class="list-group-item">
                  {{ web_server.software }}
                </li>
                <li class="list-group-item" id="li_mysql_client_version">
                  {% trans 'Database client version:' %}
                  {{ web_server.database }}
                </li>
                <li class="list-group-item">
                  {% trans 'PHP extension:' %}
                  {% for extension in web_server.php_extensions %}
                    {{ extension }}
                    {{ show_php_docu('book.' ~ extension ~ '.php') }}
                  {% endfor %}
                </li>
                <li class="list-group-item">
                  {% trans 'PHP version:' %}
                  {{ web_server.php_version }}
                </li>
              {% endif %}
              {% if php_info is not empty %}
                {{ php_info|raw }}
              {% endif %}
            </ul>
          </div>
        {% endif %}

          <div class="card mt-4">
            <div class="card-header">
              phpMyAdmin
            </div>
            <ul class="list-group list-group-flush">
              <li id="li_pma_version" class="list-group-item{{ is_version_checked ? ' jsversioncheck' }}">
                {% trans 'Version information:' %}
                <span class="version">{{ phpmyadmin_version }}</span>
              </li>
              <li class="list-group-item">
                <a href="{{ get_docu_link('index') }}" target="_blank" rel="noopener noreferrer">
                  {% trans 'Documentation' %}
                </a>
              </li>
              <li class="list-group-item">
                <a href="{{ 'https://www.phpmyadmin.net/'|link }}" target="_blank" rel="noopener noreferrer">
                  {% trans 'Official Homepage' %}
                </a>
              </li>
              <li class="list-group-item">
                <a href="{{ 'https://www.phpmyadmin.net/contribute/'|link }}" target="_blank" rel="noopener noreferrer">
                  {% trans 'Contribute' %}
                </a>
              </li>
              <li class="list-group-item">
                <a href="{{ 'https://www.phpmyadmin.net/support/'|link }}" target="_blank" rel="noopener noreferrer">
                  {% trans 'Get support' %}
                </a>
              </li>
              <li class="list-group-item">
                <a href="{{ url('/changelog') }}" target="_blank">
                  {% trans 'List of changes' %}
                </a>
              </li>
              <li class="list-group-item">
                <a href="{{ url('/license') }}" target="_blank">
                  {% trans 'License' %}
                </a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>

{{ config_storage_message|raw }}
